package com.lingxu.api.ztb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lingxu.api.ztb.mapper.AViewCspfMapper;
import com.lingxu.api.ztb.model.AViewCspf;
import com.lingxu.api.ztb.service.IAViewCspfService;
import com.lingxu.api.ztb.model.vo.AViewCspfVO;



import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.metadata.IPage;


import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletResponse;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;

/**
 * 初设批复 服务实现类
 *
 * @author admin
 * @since 2025-10-15
 */
@Slf4j
@Service
public class AViewCspfServiceImpl extends ServiceImpl<AViewCspfMapper, AViewCspf>  implements IAViewCspfService {

    @Resource
    private AViewCspfMapper aViewCspfMapper;

    @Transactional(readOnly = true)
    @Override
    public IPage<AViewCspfVO> queryPageList(AViewCspfVO query) {
        Page<AViewCspfVO> page = new Page<AViewCspfVO>(query.getPageNo(), query.getPageSize());
        return aViewCspfMapper.pageList(page,query);
    }


    @Transactional(readOnly = true)
    @Override
    public List<AViewCspfVO> list(AViewCspfVO query) {
        return aViewCspfMapper.selectAViewCspfList(query);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void delete(Set<String> ids) {
        if (CollectionUtils.isNotEmpty(ids)) {
            aViewCspfMapper.deleteBatchIds(ids);
        }
    }

}